#include "Patient.h"

Patient::Patient(void)
{
}

Patient::Patient(unsigned int filenr,const QString& name,const QString& phone, QDate dob)
{
	this->name = name;
	this->dob = dob;
	this->file_nr = filenr;
	this->phone = phone;
}

Patient::~Patient(void)
{
	int i =	0;
	foreach(Visit* v,visits)
	{
		if(v != NULL)
		{
			delete v;
			visits[i++] = NULL;
		}
	}
}

QString Patient::getName()const
{
	return this->name;
}

void Patient::setName(const QString& name)
{
	this->name = name;
}

QString Patient::getPhone() const
{
	return this->phone;
}

void Patient::setPhone(const QString &number)
{
	this->phone = number;
}
QDate Patient::getDate()const
{
	return this->dob;
}

void Patient::setDate(QDate date)
{
	this->dob = date;
}

int Patient::getFilenr()const
{
	return this->file_nr;
}

void Patient::setFilenr(int filenr)
{
	this->file_nr = filenr;
}